package com.zhuidian.mothernote.activity;

import android.content.Intent;
import android.view.View;
import android.widget.LinearLayout;

import androidx.recyclerview.widget.RecyclerView;

import com.base.presenter.BasePresenter;
import com.zhuidian.mothernote.R;
import com.zhuidian.mothernote.global.BaseActivity;
import com.zhuidian.mothernote.presenter.SearchPresenter;

public class SearchActivity extends BaseActivity<SearchPresenter> {
    private LinearLayout ll_search;
    private LinearLayout ll_cancel;
    private RecyclerView recyclerView;

    private SearchPresenter searchPresenter;

    @Override
    protected int inflateMainLayoutId() {
        return R.layout.activity_search;
    }

    @Override
    protected void initView(View view) {
        setTopGone();
        ll_search = (LinearLayout) view.findViewById(R.id.ll_search);
        ll_cancel = (LinearLayout) view.findViewById(R.id.ll_cancel);

    }

    @Override
    protected void setListener() {
        ll_cancel.setOnClickListener(this);
        ll_search.setOnClickListener(this);
    }


    @Override
    protected BasePresenter getPresenter() {
        searchPresenter = new SearchPresenter();
        return searchPresenter;
    }

    @Override
    public void onClick(View view) {
        super.onClick(view);
        switch (view.getId()) {
            case R.id.ll_search:
                startActivity(new Intent(context, SearchCompleteActivity.class));
                break;
            case R.id.ll_cancel:
                onBackPressed();
                break;
        }
    }
}
